package org.csu.small.service.impl;

import org.csu.small.entity.ProductCategory;
import org.csu.small.persistence.ProductCategoryMapper;
import org.csu.small.service.ProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ProductCategoryServiceImpl implements ProductCategoryService {

    @Autowired
    private ProductCategoryMapper productCategoryMapper;

    @Override
    public int add(ProductCategory productCategory) {
        // TODO Auto-generated method stub
        return productCategoryMapper.add(productCategory);
    }

    @Override
    public int edit(ProductCategory productCategory) {
        // TODO Auto-generated method stub
        return productCategoryMapper.edit(productCategory);
    }

    @Override
    public int delete(Long id) {
        // TODO Auto-generated method stub
        return productCategoryMapper.delete(id);
    }

    @Override
    public List<ProductCategory> findList(Map<String, Object> queMap) {
        // TODO Auto-generated method stub
        return productCategoryMapper.findList(queMap);
    }

    @Override
    public Integer getTotal(Map<String, Object> queryMap) {
        // TODO Auto-generated method stub
        return productCategoryMapper.getTotal(queryMap);
    }

    @Override
    public ProductCategory findById(Long id) {
        // TODO Auto-generated method stub
        return productCategoryMapper.findById(id);
    }

}
